Skip to content

chore(*): refactor to use built-in --strip-types Node.js flag - #863

Merged
aduh95 merged 2 commits into
nodejs:mainfrom
aduh95:bye-tsx
Aug 12, 2026
Merged

chore(*): refactor to use built-in --strip-types Node.js flag#863
aduh95 merged 2 commits into
nodejs:mainfrom
aduh95:bye-tsx

Conversation

@aduh95

@aduh95 aduh95 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

With support for Node.js 20 being dropped, we no longer need tsx and can rely on the built-in Node.js type stripping

@MikeMcC399

Copy link
Copy Markdown
Contributor

@aduh95

https://github.com/nodejs/corepack/actions/runs/27810046674/job/82298074570

corepack yarn build shows:

(node:2425) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/corepack/corepack/mkshims.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to /home/runner/work/corepack/corepack/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
All shims have been generated.

That should probably be addressed.

@aduh95

aduh95 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

I'm fine with the performance overhead, as long as that doesn't affect the distributed version

@MikeMcC399

Copy link
Copy Markdown
Contributor

I'm fine with the performance overhead, as long as that doesn't affect the distributed version

The PR removes the dependency on tsx and it is green in CI, so I don't have any other points to raise.

@aduh95
aduh95 merged commit 964f23e into nodejs:main Aug 12, 2026
9 checks passed
@aduh95
aduh95 deleted the bye-tsx branch August 12, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants